package com.atguigu.ForeachTest;

import java.util.HashSet;
import java.util.Set;

/**
 * @program: IDEAcode
 * @description:
 * @author: Mr.zjx
 * create: 2021-08-01-12-39
 **/
public class Test03 {
    public static void main(String[] args) {
        //多态性
        Set<String> set = new HashSet<String>();
        set.add("how");
        set.add("do");
        set.add("you");
        set.add("do");
        for (String s : set){
            System.out.println(s);//不存储重复元素
        }
    }
}
